import Taro, { Component } from '@tarojs/taro'
import { View, Text,Button,Checkbox} from '@tarojs/components'
import List from '../list'
import Clock from '../clock'
import './index.css'
export default class Index extends Component {
  config = {
    navigationBarTitleText: '首页'
  }
  constructor(props){
    super(props)
    this.state = {
      checked:false
    }
  }

  checkedHander = ()=>{
    console.log(22)
    this.setState(
      {checked:!this.state.checked}
    )
  }

  render () {
    const {checked} = this.state;
    return (
      <View>
        <Text>Hello world!</Text>
        <View> 这是首页</View>
        <List title={2+3}/>
        <Clock />
        <View>
          1<Checkbox checked={checked} />
          2<Checkbox checked={checked} />
          3<Checkbox checked={checked} />
        </View>
       
        <Button onClick={this.checkedHander}>按钮</Button>
      </View>
    )
  }
}
